﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TemaXP_DM71_Group1.ModelLayer;

namespace TemaXP_DM71_Group1.ControllerLayer
{
    public class CtrCinema
    {
        public Cinema FindCinema(int noOfCinema)
        {
            IFDBCinema dbCinema = new DBCinema();
            return dbCinema.FindCinema(noOfCinema);
        }
        public void InsertCinema(int noOfCinema, int noOfSeats)
        {
            IFDBCinema dbCinema = new DBCinema();
            Cinema cObj = new Cinema();
            cObj.NoOfCinema = noOfCinema;
            cObj.NoOfSeats = noOfSeats;
            dbCinema.InsertCinema(cObj);
        }
        public void UpdateCinema(int currentNoOfCinema, int noOfCinema, int noOfSeats)
        {
            IFDBCinema dbCinema = new DBCinema();
            Cinema cObj = FindCinema(currentNoOfCinema);
            cObj.NoOfCinema = noOfCinema;
            cObj.NoOfSeats = noOfSeats;
            dbCinema.UpdateCinema(currentNoOfCinema, cObj);

        }
        public void DeleteCinema(int noOfCinema)
        {
            IFDBCinema dbCinema = new DBCinema();
            dbCinema.DeleteCinema(noOfCinema);

        }

    }
}
